package com.aricksm.xuan.activity01;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

/**
 * Created by xuan on 16/6/17.
 */
public class CallBackView extends Activity {

    Button gosecondBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.call_back);

        gosecondBtn = (Button) findViewById(R.id.goSecondBtn);

        gosecondBtn.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(CallBackView.this,SecondView.class);
                startActivityForResult(intent,100);

            }
        });


    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        Log.e("CallBackView","requestCode="+requestCode);

        String backDate = data.getStringExtra("backdate");
        Log.e("CallBackView","backDate="+backDate);

    }
}
